package com.retail.xiaocui.server.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.retail.xiaocui.server.mapper.WarningMapper;
import com.retail.xiaocui.common.domain.Warning;
import com.retail.xiaocui.server.service.WarningService;

/**
 * 预警列信息Service业务层处理
 *
 * @author retail
 * @date 2024-03-01
 */
@Service
public class WarningServiceImpl implements WarningService
{
    @Autowired
    private WarningMapper warningMapper;

    /**
     * 查询预警列信息
     *
     * @param warningId 预警列信息主键
     * @return 预警列信息
     */
    @Override
    public Warning selectWarningByWarningId(Long warningId)
    {
        return warningMapper.selectWarningByWarningId(warningId);
    }

    /**
     * 查询预警列信息列表
     *
     * @param warning 预警列信息
     * @return 预警列信息
     */
    @Override
    public List<Warning> selectWarningList(Warning warning)
    {
        return warningMapper.selectWarningList(warning);
    }

    /**
     * 新增预警列信息
     *
     * @param warning 预警列信息
     * @return 结果
     */
    @Override
    public int insertWarning(Warning warning)
    {
        return warningMapper.insertWarning(warning);
    }

    /**
     * 修改预警列信息
     *
     * @param warning 预警列信息
     * @return 结果
     */
    @Override
    public int updateWarning(Warning warning)
    {
        return warningMapper.updateWarning(warning);
    }

    /**
     * 批量删除预警列信息
     *
     * @param warningIds 需要删除的预警列信息主键
     * @return 结果
     */
    @Override
    public int deleteWarningByWarningIds(Long[] warningIds)
    {
        return warningMapper.deleteWarningByWarningIds(warningIds);
    }

    /**
     * 删除预警列信息信息
     *
     * @param warningId 预警列信息主键
     * @return 结果
     */
    @Override
    public int deleteWarningByWarningId(Long warningId)
    {
        return warningMapper.deleteWarningByWarningId(warningId);
    }
}
